package akbderby.page;

import org.slim3.controller.Navigation;

import scenic3.annotation.ActionPath;
import scenic3.annotation.Default;
import scenic3.annotation.Page;

@Page("/quizse")
public class QuizSelectPage extends QuizBasePage {

    @ActionPath("search")
    public Navigation search() {
        String q = requestScope("q");
        String limit = requestScope("limit");
        if (isNull(limit))
            limit = "10";
        int iLimit = Integer.valueOf(limit);
        requestScope("resultList", service.getSelect(q, iLimit));
        return forward("/quizse/index.jsp");
    }

    @Default
    public Navigation index() {
        return forward("index.jsp");
    }

}
